package com.example.car.utils

import com.example.car.bean.NewsInfoBean
import com.example.car.bean.NewsListBean
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query

interface NewsApi {
    companion object {
        val key = "226c6defa51c0f3fc7b9b0e9c7bfe78f"
        val base_url = "http://v.juhe.cn/toutiao/"
    }

    @GET("index")
    open fun getNewsList(
        @Query("key") key: String,
        @Query("type") type: String
    ): Call<NewsListBean>

    @GET("content")
    open fun getNewsInfo(
        @Query("key") key: String,
        @Query("uniquekey") uniquekey: String
    ): Call<NewsInfoBean>
}